package zheezes.util;

public abstract class AbstractSerial implements Serialable {	
	public abstract int size();

	public byte[] getBytes() {
		byte[] buf = new byte[size()];
		getBytes(buf, 0);
		return buf;
	}

	public abstract int getBytes(byte[] buf, int offset);

	public int setBytes(byte[] buf) {
		return setBytes(buf, 0, buf.length);
	}

	public abstract int setBytes(byte[] buf, int offset, int max);
}
